import request from '@/utils/request'
import downFileRequest from "@/utils/downFileRequest";

// 生成采购文件
export function createPurchaseFile(data){
    return request({
        url: "/purchase/"+ data,
        method: "get"
    })
}
// 获得采购文件
export function getAllPurchaseFile(data){
    return  request({
        url: "/purchase/get/allPurchaseFile/" + data,
        method: "get"
    })
}


// 下载采购文件
export function downPurchaseFile(data){
    return downFileRequest({
        url:"/purchase/downloadFile/" + data,
        method: "get"
    })
}

// 获得盖章的采购文件列表
export function getAllSignedTable(data){
    return request({
        url:"/purchase/get/signed/" + data,
        method: "get"
    })
}

// 下载盖章采购文件
export function downPurchaseSignedFile(data){
    // return request({
    //     url:"/purchase/download/signed/" + data,
    //     method: "get"
    // })
    return downFileRequest({
        url:"/purchase/download/signed/" + data,
        methods: "get"
    })
}
// 删除下载盖章文件
export function deletePurchaseSigned(data){
    return request({
        url:"/purchase/delete/signed/" + data,
        method: "delete"
    })
}
